let cookieUtil = {
  //传cookie名字，返回对应的值
  getCookie:function(name){
    let cookie = document.cookie
    //没有cookie返回空
    if(!cookie){
      return null
    }
    //有cookie
    //切分 得到数组
    let cookies = cookie.split(";")
    //遍历数组
    for (const ck of cookies) {
      //切分
      let kv = ck.split("=")
      //判断
      if(kv[0].trim() == name){
        return kv[1]
      }
      
    }
    return null
  }
}
export default cookieUtil